//@ts-ignore
import request from '@/utils/request';
//@ts-ignore
import {
  FavoriteListRequestData,
  ResponseData,
  AddFavoriteRequestData,
  DelateFavoriteRequestData
} from "@/api/favorite/type";

/**
 * 收藏接口集合
 */
enum API {
  FAVORITE_LIST_URL = '/favorite/list',
  ADDFAVORITE_URL = '/favorite/add',
  UPDATEFAVORITE_URL = '/favorite/delete',
}

export const reqFavoriteList = (data: FavoriteListRequestData) =>
    request.post<any, ResponseData>(API.FAVORITE_LIST_URL, data)

export const reqAddFavorite = (data: AddFavoriteRequestData) =>
    request.post<any, ResponseData>(API.ADDFAVORITE_URL, data)

export const reqDelateFavorite = (data: DelateFavoriteRequestData) =>
    request.post<any, ResponseData>(API.UPDATEFAVORITE_URL, data)




